package fwk.display.particules
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.geom.Matrix;
	import flash.geom.Rectangle;
	
	
	public class Particule extends Bitmap
	{
		
		
		
		
		public function Particule(clip:Sprite, pwidth:int = -1, pheight:int = -1):void
		{
			
			//var rect:Rectangle =  clip.getBounds(clip);
			//var matrice:Matrix = new Matrix(rect.x, rect.y, rect.width, rect.height);
			var bitmapData:BitmapData;
			if ( pwidth != -1 && pheight != -1) {
				bitmapData = new BitmapData(pwidth, pheight, true, 0x00000000);
			}else {
				bitmapData = new BitmapData(clip.width + 1, clip.height + 1, true, 0x00000000);
			}
			
			bitmapData.draw(clip);
			
			super(bitmapData, "auto", true);

			
		}

		
		
	}
	
	
}

